package com.seednia.foundation.framework.extension;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ApplicationObjectSupport;

import com.seednia.foundation.framework.service.ServiceContainer;

/**
 * This is called once after the applicationContext.xml is loaded 
 * (not when the *-servlet.xml is loaded)
 * Use InitAppListener instead
 * 
 * @author Young Suk Ahn
 * @deprecated
 */
public class ServiceContainerInitializer extends ApplicationObjectSupport
{
	
	private static final Log logger = LogFactory.getLog(ServiceContainerInitializer.class);

	@Override
	protected  void	initApplicationContext(ApplicationContext appContext)  {
		
		int numServices = ServiceContainer.getInstance().loadServices(appContext);
		logger.info("Loaded "+numServices+" services");
	}

}
